﻿<%@ Page Title="" Language="C#" MasterPageFile="~/adm/Admin.Master" AutoEventWireup="true" CodeBehind="SubmissionEvaluation.aspx.cs" Inherits="InstituteManager.adm.SubmissionEvaluation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <h3>Submission Evaluation</h3>
	
    <asp:Panel ID="pnlMessage" runat="server" CssClass="informasi" Visible="False">
        <asp:Label ID="lblMessage" runat="server" Text="Message"></asp:Label>
    </asp:Panel>


    <asp:Panel ID="pnlView" runat="server" CssClass="clssdiv">
    <div class="control">
        <asp:LinkButton ID="lbtRefreshT" runat="server" CssClass="refresh" 
            onclick="lbtRefresh_Click">Refresh</asp:LinkButton>
        |<a href="javascript:history.back();" id="lbtBackTV" Class="back" 
            >Go Back</a>
    </div>
    
        <div style="margin-left:5%;margin-top:20px;">
            <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
            <asp:ImageButton ID="ibtSearch" runat="server" CssClass="search"
                ImageUrl="~/images/icons/google_custom_search.png" ToolTip="Search" 
                onclick="ibtSearch_Click" />
        </div>
    
        <asp:GridView ID="grvView" runat="server" CssClass="data" 
            AutoGenerateColumns="False" EnableModelValidation="True" 
            onrowdatabound="grvView_RowDataBound" AllowPaging="True" 
            onpageindexchanging="grvView_PageIndexChanging" 
            onrowcommand="grvView_RowCommand" DataKeyNames="CompetitionId" 
            Width="698px">
                <Columns>
                    <asp:TemplateField>
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <HeaderTemplate>
                            <asp:CheckBox ID="chkSelectAll" runat="server" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="CompetitionId" HeaderText="CompetitionId" 
                        Visible="False" />
                    <asp:BoundField DataField="CompetitionName" HeaderText="Competition Name" />
                    <asp:BoundField DataField="StartDate" HeaderText="Start Date" 
                        DataFormatString="{0:d}" />
                    <asp:BoundField DataField="EndDate" HeaderText="End Date" 
                        DataFormatString="{0:d}" />
                    <asp:TemplateField HeaderText="Status">

                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# getCompetitionStatusName(DataBinder.Eval (Container.DataItem,"CompetitionId").ToString()) %>'></asp:Label>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/icons/award_star_bronze_2.png" ToolTip="Award Issued" Visible='<%# getAwardIssued(DataBinder.Eval(Container.DataItem,"CompetitionId").ToString()) %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="NoOfPost" HeaderText="Number of Postings" />
                    <asp:TemplateField HeaderText="Command">
                        <ItemTemplate>                            
                            <asp:ImageButton ID="ibtMark" runat="server" AlternateText="Posting Evaluation" CommandArgument='<%# DataBinder.Eval (Container.DataItem, "CompetitionId") %>'
                                CommandName="cmdViewPosts" ImageUrl="~/images/icons/pictures.png" ToolTip="Postings Evaluation" />
                            <asp:ImageButton ID="ibtReward" runat="server" AlternateText="Reward" CommandArgument='<%# DataBinder.Eval (Container.DataItem, "CompetitionId") %>'
                                CommandName="cmdReward" ImageUrl="~/images/icons/gift_add.png" ToolTip="Reward" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="data" />
                <PagerSettings Mode="NumericFirstLast" PageButtonCount="5" />
                <PagerStyle HorizontalAlign="Center" Wrap="True" />
                <RowStyle CssClass="data" />
            </asp:GridView>

                

      <div class="control">
        <asp:LinkButton ID="lbtRefreshB" runat="server" CssClass="refresh" onclick="lbtRefresh_Click">Refresh</asp:LinkButton>
        |<a href="javascript:history.back();" ID="lbtBackB" Class="back">Go Back</a>
    </div>
    </asp:Panel>
    
   <asp:Panel ID="pnlPosting" runat="server" CssClass="clssdiv" Visible="false">
    <div class="control">
        <asp:LinkButton ID="lbtRefreshTP" runat="server" CssClass="refresh" 
            onclick="lbtRefreshPost_Click">Refresh</asp:LinkButton>
        |<asp:LinkButton ID="lblBackTPost" runat="server" CssClass="back" OnClick="lblBackPost_Click" CausesValidation="False">Go Back</asp:LinkButton>
    </div>
    
        <div style="margin-left:5%;margin-top:20px;">
            <asp:TextBox ID="txtSearchPost" runat="server"></asp:TextBox>
            <asp:ImageButton ID="imbSearchP" runat="server" CssClass="search"
                ImageUrl="~/images/icons/google_custom_search.png" ToolTip="Search" 
                onclick="ibtSearch_Click" />
        </div>

       <asp:TextBox ID="txtCompeId" runat="server" Visible="false"></asp:TextBox>
    
        <asp:GridView ID="grvPosting" runat="server" CssClass="data" 
            AutoGenerateColumns="False" EnableModelValidation="True" 
            onrowdatabound="grvView_RowDataBound" AllowPaging="True" 
            onpageindexchanging="grvPosting_PageIndexChanging" 
            onrowcommand="grvView_RowCommand" DataKeyNames="PostingId,Mark" 
            Width="698px">
                <Columns>
                    <asp:TemplateField>
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <HeaderTemplate>
                            <asp:CheckBox ID="chkSelectAll" runat="server" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="PostingId" HeaderText="PostingId" 
                        Visible="False" />
                    <asp:BoundField DataField="PostingName" HeaderText="Posting Name" />
                    <asp:BoundField DataField="PostDate" HeaderText="Posted Date" 
                        DataFormatString="{0:d}" />
                    <asp:TemplateField HeaderText="Mark">
                        
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# getMarkString(DataBinder.Eval(Container.DataItem, "Mark")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Command">
                        <ItemTemplate>                            
                            <asp:ImageButton ID="ibtMark" runat="server" AlternateText="Mark" CommandArgument='<%# DataBinder.Eval (Container.DataItem, "PostingId") %>'
                                CommandName="cmdMark" ImageUrl="~/images/icons/picture_edit.png" ToolTip="Mark" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Mark" HeaderText="MarkId" Visible="False" />
                </Columns>
                <HeaderStyle CssClass="data" />
                <PagerSettings Mode="NumericFirstLast" PageButtonCount="5" />
                <PagerStyle HorizontalAlign="Center" Wrap="True" />
                <RowStyle CssClass="data" />
            </asp:GridView>

                

      <div class="control">
        <asp:LinkButton ID="lbtRefreshPostT" runat="server" CssClass="refresh" onclick="lbtRefreshPost_Click">Refresh</asp:LinkButton>
        |<asp:LinkButton ID="lblBackBPost" runat="server" CssClass="back" OnClick="lblBackPost_Click" CausesValidation="False">Go Back</asp:LinkButton>
    </div>
    </asp:Panel>


    <asp:Panel ID="pnlUpdate" runat="server" Visible="False">
        
        <div class="control">
            <asp:LinkButton ID="LinkButton3" runat="server" CssClass="back" OnClick="lbtBack_Click" CausesValidation="False">Go Back</asp:LinkButton>

        </div>
        

        <table width="95%" class="data">
            <tr><th>Data Name</th><th>&nbsp;Data</th></tr>

			    <tr><td width="125px"><b>Posting Name</b></td><td> 
                    <asp:Label ID="lblPostingName" runat="server" Text=""></asp:Label>
                    </td></tr>
			    <tr><td class="data"><b>Post Date</b></td><td class="data">
                    <asp:Label ID="lblPostDate" runat="server" Text=""></asp:Label>
                    </td></tr>
                <tr><td><b>Description</b></td><td>
                    <asp:Label ID="lblDescription" runat="server" Text=""></asp:Label>                                
                    </td></tr>
			    <tr><td><b>Student Name</b></td><td>
                    <asp:Label ID="lblStudentName" runat="server" Text=""></asp:Label> 
                    </td></tr>
                <tr><td><b>Image</b></td><td class="update">
                    <asp:Image ID="imgImage" runat="server" ImageUrl="~/images/icons/eye.png" />
                    </td></tr>                
			    </table>

           <div class="control">
            <asp:LinkButton ID="lbtSaveT" runat="server" CssClass="save" onclick="lbtSave_Click">Save</asp:LinkButton>
            |<asp:LinkButton ID="lbtBackUT" runat="server" CssClass="back" OnClick="lbtBack_Click" CausesValidation="False">Go Back</asp:LinkButton>

        </div>

        <asp:TextBox ID="txtId" runat="server" Visible="False"></asp:TextBox>

		    <table width="95%" class="update">
			    <tr><td width="125px"><b>Mark</b></td><td> 
                    <asp:DropDownList ID="ddlMark" runat="server">
                        <asp:ListItem Value="0">Choice Mark</asp:ListItem>
                        <asp:ListItem Value="1">Best</asp:ListItem>
                        <asp:ListItem Value="2">Better</asp:ListItem>
                        <asp:ListItem Value="3">Good</asp:ListItem>
                        <asp:ListItem Value="4">Moderate</asp:ListItem>
                        <asp:ListItem Value="5">Normal</asp:ListItem>
                        <asp:ListItem Value="6">Disqualified</asp:ListItem>
                    </asp:DropDownList>	    
		        <tr><td><b>Remark</b></td><td>
                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine"></asp:TextBox>
                    
                    </td></tr>
			    
		    </table>

        <div class="control">
            <asp:LinkButton ID="lbtSaveB" runat="server" CssClass="save" 
                onclick="lbtSave_Click">Save</asp:LinkButton>
            |<asp:LinkButton ID="lbtBackUB" runat="server" CssClass="back" OnClick="lbtBack_Click" CausesValidation="False">Go Back</asp:LinkButton>
        </div>
    </asp:Panel>
    

</asp:Content>
